var starter_controllers=angular.module('starter.controllers', [])

starter_controllers.controller('DashCtrl', function($scope,$http) {

  $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
  $http.post(BASEURL+"index.php?user&q=login&XDEBUG_SESSION_START=34343",
    //"keywords=18368786006&password=lxflxf&ajax=1"
    $.param({keywords:18368786006,password:'lxflxf',ajax:1})
  ,{withCredentials: true}
  ).success(function(data){
    if(data=="1"){



      $http.post(BASEURL+"?zh_syxq",
       null
        //"keywords=18368786006&password=lxflxf&ajax=1"
        //$.param({keywords:18368786006,password:'lxflxf',ajax:1})
        ,{withCredentials: true}
      ).success(function(data){
        console.log(data);
      });

    }else{
      alert(data);
    }
  })
        $scope.phone="13545131";
        $scope.syt=[{syl:19.5,qx:"15天",sy:"57.84元",jd:80}];
        $scope.myActiveSlide = 1;
        $scope.phone1="";


      $scope.login=function(){
          alert("模拟登陆成功");
      }


        $scope.zc=function(){
            alert("模拟注册成功");
        }






    })

  .controller('listCtrl', function($scope) {

    //$scope.shangpings=shangpings;
    //
    //
    //$scope.remove= function  (index) {
    //  alert($scope.shangpings[index].name)

    //};
       $scope.tzje1="";
        $scope.qr= function () {
            alert("模拟投资成功");
        }


  })

.controller('ChatsCtrl', function($scope, Chats) {
  // With the new view caching in Ionic, Controllers are only called
  // when they are recreated or on app start, instead of every page change.
  // To listen for when this page is active (for example, to refresh data),
  // listen for the $ionicView.enter event:
  //
  //$scope.$on('$ionicView.enter', function(e) {
  //});

  $scope.chats = Chats.all();
  $scope.remove = function(chat) {
    Chats.remove(chat);
  };
})
    .controller('myCtrl', function($scope) {
      $scope.phone="17757725343";
      $scope.dshou="215.16";
      $scope.dhbj="210";
      $scope.dhlx="5.16";
      $scope.zong="215.16";
      $scope.kyyue="0.2";
      $scope.djyue="0.00";
      $scope.mysy="7.16";
    $scope.jcgx=function(){
      alert("当前为最近版本");
    }


    })
.controller('ChatDetailCtrl', function($scope, $stateParams, Chats) {
  $scope.chat = Chats.get($stateParams.chatId);
})

.controller('jifenCtrl', function($scope) {

});
